Apparatus for performing modal interval calculations based on decoration configuration

ABSTRACT

Apparatus performs various modal interval computations, while accounting for various modal interval operand configurations that are not amenable to ordinary computational operations. Upon detecting an exponent field of all 1&#39;s, the apparatus adapts various conventions involving leading bits in the fraction field of the modal interval endpoints to return a result having a useful meaning.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation of application Ser. No. 15/419,215, filed Jan.30, 2017, now U.S. Pat. No. 9,934,198 (Apr. 3, 2018), which is acontinuation of application Ser. No. 14/421/272, filed Feb. 12, 2015,now U.S. Pat. No. 9,558,155, which is a USC § 371 national phase entryof international application PCT/US2013/055162 filed Aug. 15, 2013,which is an international application filed under 35 U.S.C. § 363claiming priority, under 35 U.S.C. § 119(e)(1), of provisionalapplication Ser. No. 61/683,456, previously filed Aug. 15, 2012, under35 U.S.C. § 111(b).

BACKGROUND OF THE INVENTION

Computer arithmetic is the practice of performing mathematicaloperations in a computer. Originally proposed in 1945 by John vonNeumann, an arithmetic logic unit (ALU) is a digital circuit thatperforms integer arithmetic and logical operations. The ALU is afundamental building block of the central processing unit of a computer.Data is provided as input to the ALU, an external control unit tells theALU what operation to perform on that data, and then the ALU transformsthe input data into an output. The input data are called the operands,and the output of the ALU is called the result. Each operation that theALU is capable of performing may produce a different result for the sameset of operands.

In modern computers, the integer operands are typically encoded intodigital signals using well-known formats like two's complement or binarycoded decimal. An ALU may also calculate with non-integer formats, butthese types of ALU are usually given a more specific name. For example,an ALU that performs operations on floating point operands is typicallycalled a floating point unit (FPU). In applicant's U.S. Pat. No.7,949,700 entitled “Modal Interval Processor,” incorporated herein byreference, an ALU taking modal interval operands as input, performing amodal interval operation specified by a selector signal, and thenproducing a modal interval result is called a modal interval processingunit (MIPU).

Regardless of the formats that any particular type of ALU may calculatewith, it is common in many ALU designs to also take as input or produceas output a set of condition codes. These codes may be used to indicatecases such as carry-in, carry-out, zero, parity, etc. However, anothercommon use for these codes is to indicate the presence or absence ofexceptional conditions.

An exception is a particular state that may occur in an ALU when anoperation is performed on a specific set of operands. For example, theIEEE Standard for Floating Point Arithmetic (IEEE Std 754-2008 In IEEEStd 754-2008, Aug. 29, 2008, pp. 1-58), incorporated herein byreference, defines exactly five (5) exceptions known as InvalidOperation, Division by Zero, Overflow, Underflow and inexact. In theevent any operation conforming to the standard reaches a statecharacterized by one of these five exceptional conditions, certainmechanisms are specified which allow a user to detect the exceptionalcondition. One mechanism specified by the standard is to require that adesignated exception flag is set. Another mechanism requires theoperation to encode a special non-numeric value known as a Na(Not-a-Number) in the result. In the thriller case, a user may determineif an exception occurred during an operation by checking to see if thedesignated exception flag is set. In the latter case, the user maydetermine if an exception occurred by checking to see if the operationresult is a NaN.

Similarly, applicant's U.S. Pat. No. 8,204,926 entitled “Reliable andEfficient Computation of Modal interval Arithmetic Operations,”incorporated herein by reference, discloses a set of digital circuitsthat allow certain exceptional conditions to be detected in variousmodal interval arithmetic operations. If an exception is detected,methods similar to those specified in IEEE 754-2008 may allow a user todetermine if an exception occurred.

The focus of the present invention is an improved system and method ofdetecting exceptions in modal interval arithmetic operations (whichincludes but is not limited to the so-called. “classical” intervalarithmetic, a distinction made and discussed in applicant's previouslyreferenced patents). As shown in applicant's white paper entitled“Decorations as State Machine,” prior art methods of detectingexceptional conditions in interval operations lack several importantproperties that allow a user to detect certain types of exceptions orelse have the potential to lose information about exceptions that mayhave occurred in prior operations. In the worst case, some prior artmethods can under certain circumstances actually provide misleadinginformation or even be totally incorrect. So there is still yet a needfor a new and improved system and method to detect exceptionalconditions in interval operations that overcome these limitations ofprior art methods.

BRIEF DESCRIPTION OF THE INVENTION

Apparatus calculates a first result modal interval dependent on a firstmodal interval. Each modal interval is defined by first and secondendpoints. Each endpoint comprises sign, fraction and exponent bitfields.

The apparatus broadly comprises a first operand register for holding thefirst and second endpoints, and for providing a first operand signalspecifying the contents of the first modal interval endpoints' fields.

The apparatus also includes a first analysis element that receives thefirst operand signal, that creates first and second truth tablesdependent on the first operand signal, and that encodes the first andsecond truth tables in a first truth tables signal.

The apparatus further includes a first logic array receiving the firstoperand signal and the first truth tables signal. This first logic arrayprovides a first “empty” bit value signal dependent on the sign,fraction, and exponent field contents of the first and second endpoints.

Lastly, in this broad version, the apparatus also includes a firstcomputational element receiving the first operand signal and the “empty”bit value signal. The first computational element then performs acomputation associated with the first computational element using thedata encoded in the first operand signal and the “empty” bit valuesignal. The result of that computation is provided in a first resultsignal encoding the result of the computation by the first computationalelement. Such computations may include inverse, transcendentalcomputations, squares, square roots, etc.

In a further version of this invention, the first analysis elementcreates the first and second truth tables dependent on a preselectedexponent field bit configuration in each of the first and secondendpoints, and on a preselected fraction field configuration in each ofthe first and second endpoints.

The broad version of the invention described above may be adapted forcalculating a second result modal interval dependent on the first modalinterval and on a second modal interval having the same structure as thefirst modal interval. This version is suitable for modal intervalcalculations involving two operands such as multiplication, division,adding, and subtracting,

Such a version includes a second operand register for holding the secondmodal interval, and for providing a second operand signal specifying thecontents of the second modal interval's endpoints' fields.

This version includes a second analysis element that receives the secondoperand signal, that creates third and fourth truth tables dependent onthe second operand signal, and that encodes the third and fourth truthtables in a second truth tables signal.

This two operand version also has a second logic array receiving thesecond operand signal and the second truth tables signal, and providinga second “empty” bit value signal dependent on the sign, exponent, andfraction values in the third and fourth endpoints. A third logic arrayreceives the first and second truth tables signals and generates firstand second multiplexer control signals based on the first and secondtruth tables signals.

This version also includes at least first and second multiplexers eachhaving a control terminal and first and second input terminals. Thesefirst and second multiplexers receive respectively the first and secondmultiplexer control signals at the control terminals thereof. Eachmultiplexer has first and second data terminals, and each multiplexergates data present at the one of the first and second data inputterminals as selected by the multiplexer control signal to create amultiplexer output signal at an output terminal of the multiplexerinvolved, that encodes the bit values present at the selected inputterminal.

Connections provide to the first multiplexer's first and second dataterminals respectively, the values of selected bits in the first andsecond endpoints' fraction fields.

Other connections provide to the second multiplexer's first and seconddata terminals respectively the values of selected bits in the third andfourth endpoints' fraction fields.

A second computational element in this version receives the first andsecond operands signals, the first and second “empty” bit value signals,and the first and second multiplexer output terminal signals. The secondcomputational element then performs a computation associated with thesecond computational element using the data encoded in the first andsecond operand signals, the “empty” bit value signals, and the first andsecond multiplexer output signals. The second computational elementprovides a second result signal encoding the second result modalinterval as a result of the computation by the second computationalelement.

The apparatus may be further adapted to process at least one of an EINsignal and a GAP signal. Such apparatus comprises third and fourthmultiplexers each with the structure of the first and secondmultiplexers. The third and fourth multiplexers receive the first andsecond multiplexers' output signals respectively at the first inputterminals of the third and fourth multiplexers, and one of the EINsignal and the GAP signal at the second input terminals of the third andfourth multiplexers. The third and fourth multiplexers receive at thecontrol terminals thereof third and fourth multiplexer control signalsrespectively, and provide at the respective third and fourthmultiplexers' output terminals the signal at the respective inputterminal specified by the control signal at the respective controlterminal.

A fourth logic array receives the first and second truth tables signalsand generates therefrom the third and fourth multiplexer controlsignals.

A further version of this apparatus comprises a comparator receiving theoutput signals of the first and second multiplexers at first and secondinput terminals respectively. The comparator provides a comparatoroutput signal having a first value responsive to the value encoded inthe first multiplexer's output signal numerically exceeding the valueencoded in the second multiplexer's output signal, and a second valueotherwise.

This version includes a fifth multiplexer with the structure of thefirst and second multiplexers. The fifth multiplexer at the first andsecond input terminals receives the second endpoints recorded in thefirst and second operand registers, and the comparator output signal atthe control terminal. A sixth multiplexer also has the structure of thefirst and second multiplexers. The sixth multiplexer at the first andsecond input terminals receives the first endpoints recorded in thefirst and second operand registers, and the comparator output signal atthe control terminal

The second computational element includes a first sub-element providingas a result of the computation by the second computational element andresponsive to a first configuration of the first and second “empty” bitvalue signals, the data forming the fifth and sixth multiplexer outputsignals as the first and second endpoints of the result modal intervalencoded in the second result signal.

A second sub-element of the second computational element, as a result ofthe computation by the second computational element and responsive to asecond configuration of the first and second “empty” bit value signalsdifferent from the first configuration thereof, provides as the secondresult modal interval encoded in the second result signal, the first andsecond endpoints recorded in the first operand register as the secondand first endpoints of the second result modal interval.

A third sub-element of the second computational element, as a result ofthe computation by the second computational element and responsive to athird configuration of the first and second “empty” bit value signalsdifferent from the first and second configurations thereof, provides asthe second result modal interval encoded in the second result signal,the first and second endpoints recorded in the second operand registeras the second and first endpoints of the second result modal interval;and

A fourth sub-element of the second computational element, as a result ofthe computation by the second computational element and responsive to afourth configuration of the first and second “empty” bit value signalsdifferent from the first through third configurations thereof, providesas the second result modal interval encoded in the second result signal,the results of a selected modal interval calculation.

DESCRIPTION OF THE FIGURES

FIG. 1 depicts the natural domain of the floor function, which is theentire real number line. The function is not continuous on its naturaldomain, however the restriction of the function to the intervalX=[1,3/2] is continuous.

FIG. 2 is a visualization of modal intervals in the R² plane, Pointsabove the λ=p line are proper modal intervals and points below this lineare improper modal intervals. Points on the line are point-wise modalintervals.

FIG. 3 is a visualization of the inclusion (⊆) and less-or-equal (≤)relations for modal intervals B, C, D and E relative to modal intervalA.

FIG. 4 depicts how the syntax tree of a real function implicitly definesa modal interval expression. Real operators are transformed into theirmodal interval extension and real variables into modal intervalvariables.

FIG. 5 defines the five tracking decorations of the present invention inTABLE 1 and the five static decorations of the present invention inTABLE 2. TABLE 3 is an alternate definition of the static decorations inTABLE 2. TABLE 4 defines bit encodings of tracking decorations in a NaNdecoration field of an IEEE 754-2008 binary64 datum.

FIG. 6 is a Venn Diagram showing the logical relations between the fivesets of tracking decorations of the present invention.

FIG. 7 is a Venn Diagram showing the logical relations between the fivesets of static decorations of the present invention.

FIG. 8 depicts an IEEE 754-2008 interchange encoding for a binary64datum. The NaN decoration field in bits 49 and 50 is not part of theIEEE 754-2008 standard and is defined solely for the sake of the presentinvention.

FIG. 9 is a logic diagram that defines a truth table consisting of Sign(S), NaN (N). Infinity (I) and Zero (Z) classification bits for abinary64 datum.

FIG. 10 depicts a modal interval datum [a₁,a₂], which is encoded into128 bits as two binary64 datums a₁ and a₂.

FIG. 11 is a logic diagram that defines the Empty (E) bit and TrackingDecoration (T) of a modal interval datum.

FIG. 12 depicts a unary modal interval operation, which takes an operand[a₁, a₂] as input and produces a result [b₁, b₂].

FIG. 13 is a logic diagram for a unary modal interval operation usingdecorations.

FIG. 14 is a logic diagram for a modal interval negation operation.

FIG. 15 is a logic diagram for a modal interval reciprocal operation.

FIG. 16 is a logic diagram for a restricted modal interval reciprocaloperation.

FIG. 17 is a logic diagram for a modal interval sign operation.

FIG. 18 is a logic diagram for a modal interval absolute valueoperation.

FIG. 19 is a logic diagram for a modal interval square operation.

FIG. 20 is a logic diagram for a modal interval square root operation.

FIG. 21 is a logic diagram for a restricted modal interval square rootoperation.

FIG. 22 is a logic diagram for a modal interval exponential operation.

FIG. 23 is a logic diagram for a modal interval logarithm operation.

FIG. 24 is a logic diagram for a restricted modal interval logarithmoperation.

FIG. 25 depicts a binary modal interval operation, which takes operands[a₁, a₂] and [b₁, b₂] as input and produces a result [c₁, c₂].

FIG. 26 is a logic diagram for a binary modal interval operation usingdecorations.

FIG. 27 is a logic diagram for a modal interval addition operation.

FIG. 28 is a logic diagram for a modal interval subtraction operation.

FIG. 29 is a logic diagram for a modal interval multiplicationoperation.

FIG. 30 is a logic diagram for a modal interval division operation.

FIG. 31 is a logic diagram for a modal irate operation.

FIG. 32 is a logic diagram for a modal interval maximum operation.

FIG. 33 is a logic diagram for a modal interval meet operation.

FIG. 34 is a logic diagram for a modal interval join operation.

DESCRIPTION OF THE INVENTION

In furtherance of disclosing important features of the present inventionand distinguishing it from the references of prior art, a preliminaryoverview of related concepts and prior art work is in order.

Natural Domains and Continuity

In the realm of pure mathematics, operations on real numbers arefunctions that have a natural domain. For example, the square root of anegative real number is not defined, so the natural domain of the squareroot operation is the set of all non-negative real numbers. Division byzero is also not defined, so the natural domain of the reciprocaloperation is the set of all non-zero real numbers. And so on for eachcontemplated operation. In other words, whenever the input to anoperation is not an element of the natural domain of the operation, theoperation is not defined.

Continuity is another important property of functions of real numbers.Formal definitions of a continuous function are well-known in the priorart and can be given in terms of sequences or limits of the function.Informally, if a function is continuous then any time a sequenceconverges in the domain, the image of the sequence in the range alsoconverges. In other words, one could either take the limit first, andthen apply the function, or apply the function first, and then take thelimits.

Even more particularly, if ƒ: R_(n)→R is a function that mapsn-dimensional real vectors R^(n) to real numbers R and D_(ƒ)⊆R^(n) isthe natural domain of ƒ, then for any X⊆D_(ƒ), the property ofcontinuity may be further defined in terms of the restriction ƒ on X. Inthis case, the only relevant aspect of the continuity property is withrespect to the portions of the function ƒ that are restricted to thedomain X, wherein X is a subset of the natural domain D_(ƒ) of thefunction.

For example, consider the function floor(x) R→R depicted in FIG. 1 whichrounds the real number x to the closest integer n such that n≤x. Thefloor function is defined for any real number x. So the natural domainof the function is the entire real number line. However, the function isnot continuous on its natural domain. This is because, for example, ifx=1 there is no sequence or limit from the left of x=1 that converges toƒ(x)=1. However, if the restriction of the floor function to theinterval X=[1, 3/2] is instead considered, then the floor function iscontinuous on X because there is no x ∈ X such that x<1 and this meansthere can be no sequence or limit from the left of x=1.

The restriction of a function to X can be continuous if and only if X isalso a subset of the natural domain of the function. For example, thenatural domain of the square root operation is the set of allnon-negative real numbers. So the restriction of the square rootoperation to X=[−16, 4] cannot be continuous because there are elementsof X=[−16, 4] which do not belong to the natural domain of the operationand for which the operation is not defined. In other words, X in thiscase is not a subset of the natural domain of the operation.

Because the empty set (Ø) is a subset of every set, it is also a subsetof all natural domains of all functions. The restriction of a functionto the empty set must therefore be contemplated. As it turns out, therestriction of any function to the empty set X=Ø is always defined andcontinuous. This is perhaps a little counterintuitive, but nonethelessmathematically correct. Formal mathematical reasoning to prove this iswell known in the prior art.

Modal Intervals

The present invention is concerned with modal interval arithmetic andmodal interval analysis. In particular, the present invention isconcerned with an improved system and method of detecting exceptionalconditions in modal interval operations. The prior notions of a realfunction, the natural domain of a real function, and the restriction ofa real function to a subset of the natural domain of the function arctherefore lifted into the topic of modal intervals.

For the purposes of the present invention, a modal interval is definedas an ordered pair [a,b] such that a and b arc real numbers or signedinfinities. However, the two pairs [−∞, −∞] and [+∞, +∞] are excluded.Note that no restriction a≤b is required.

The set-theoretic interpretation of a modal interval is defined as

Set([a, b])={x∈ R: min(a, b)≤x≤max(a, b)},

and the notation x ∈ [a, b] may be used as an abbreviation for x ∈Set([a, b]). The empty set (Ø) is not a modal interval, howeverSct(Ø)=Ø.

A closed interval includes all of its limit points. Every modal interval[a, b] is a closed interval. If both a and b arc real numbers, the modalinterval is bounded. If a modal interval is not bounded, then at leastone of the endpoints is −∞ or +∞ and the modal interval still containsall of its limit points but not all of its endpoints. Modal intervals ofthe form

-   -   [−∞, +∞], [−∞, b], [a, +∞], [+∞, b], [a, −∞] and [+∞, −∞]

are therefore understood to be unbounded. Despite the use of squarebrackets, infinity is never an element of any modal interval, and

-   -   [−∞, −∞] and [+∞, +∞]

are by definition not modal intervals.

A modal interval [a, b] is called proper if a≤b. The modal interval iscalled improper if a≥b. It is called a point or a point-wise modalinterval if a=b. Note that a point-wise modal interval is also a properand an improper modal interval at the same time.

The set of all bounded modal intervals can be visualized as points inthe R² plane, where canonical abscissa and ordinate are definedrespectively as the left and right bound of a modal interval [a, b], i.c.,

λ([a, b])=a and p([a, b])=b.

FIG. 2 is such a visualization. Points above the λ=p line are propermodal intervals and points below this line are improper modal intervals.Points on the line are point-wise modal intervals. It should be notedthe subset of bounded modal intervals visualized in the figure is thefamous set known in the prior art as the Kaucher intervals. Also, thesubset of the Kaucher intervals on or above the λ=p line is the famousset of “classic” intervals popularized in the late 1960's by Ramon E.Moore. The set of classic intervals does not include any improperintervals.

As of this date, the subset of bounded and unbounded proper modalintervals is the set of intervals supported in the working draft of theIEEE Standard for Interval Arithmetic. That standard is currently underdevelopment by the P1788 Working Group committee at the time of thiswriting and does not provide any provision for bounded or unboundedimproper intervals. The present vention therefore contemplates thebroadest set of “intervals” as it is the only one that consists of a setwherein each element of the set ay be bounded or unbounded, proper orimproper.

A predicate is a Boolean function, and a proposition is a predicate,wherein each variable is universally (∀) or existentially (∃)quantified.

The modal quantifier Q of a modal interval [a, b] quantifies a realvariable x by the definition

Q(x, [a, b])=if a≤b then ∀x∈ Set([a, b]) else ∃x∈ Set([a, b]).

The modal operators are

-   -   Dual([a, b])=[b, a],    -   Prop([a, b])=[min(a, b), max(a, b)],    -   Impr([a, b])=[max(a, b), min(a, b)],

and the corresponding modal quantifiers D, E and U are defined as

-   -   D(x, [a, b])=Q(x, Dual([a, b])),    -   E(x, [a, b])=Q(x, Prop([a, b]),    -   U(x, [a, b])=Q(x, Impr([a, b]).

With the modal quantifiers Q, D, E and U it is possible to formpropositions with modal intervals. For example, if A and B are modalintervals then the inclusion (⊆) relation is

A⊆B⇔D(a, A)Q(b, B): a=b,

and the less-or-equal (≤) relation is

A≤B⇔U(a, A)E(b, B): a≤b and U(b, B)E(a, A): a≤b.

FIG. 3 is a geometric visualization of these modal interval relations inthe R² plane. The inclusion and less-or-equal relations are shown formodal intervals B, C, D and E relative to the modal interval A.

If x is a real number, the rounding operators ∇(x) and Δ(x) are digitalapproximations of x such that the relations

∇(x)≤x and Δ(x)≥x

are always true. For any modal interval [a, b],

Inn([a, b])=[Δ(a), ∇(b)] and Out([a, b])=[∇(a), Δ(b)]

are the “inner” and “outer” digital roundings, respectively of [a, b].

The inner and outer digital roundings are universally possible for anydigital scale and satisfy the property.

Inn([a, b])⊆[a, b]⊆Out([a, b])

such that the equivalence

Inn([a, b])=Dual(Out(Dual([a, b])))

makes unnecessary the implementation of the inner rounding.

Decorations and Proper Tracking

A decoration is a mathematical property of a real function restricted tothe domain of its modal interval inputs. Decorations provide a frameworkfor detecting exceptional conditions such as out-of-domain arguments ornon-continuous functions.

Looking at the syntactic tree for a real function, where the nodes areoperators, the leaves are variables, and branches define the domain ofeach operator, the real function can be operationally extended to amodal interval expression by using the computational program implicitlydefined by the syntactic tree of the real function. This is accomplishedby transforming all of the real operators into their modal intervalextension and all of the real variables into modal interval variables.

FIG. 4 is an example that shows how the syntax tree of the real function

ƒ(x, y)=y/sqrt((1−x)*(1+x))

implicitly defines a modal interval expression. Real operators andvariables 12 are respectively transformed into their modal intervalcounterparts 15. Evaluation of the expression begins at the leafs of thetree, where variables are propagated up the branches to the operations.The operations accept the variables as operands, perform an operationand generate a result. The result of each operation is then propagatedup the branches into other operations until all nodes in the tree havebeen evaluated and a final result is propagated to the root of the tree.

The present invention makes a distinction between two types ofdecorations. A static decoration is the absolute mathematical truthabout the restriction of an individual operation to the domain of itsmodal interval inputs. A tracking decoration, on the other hand, is amathematical implication that is obtained for a modal intervalexpression by propagating static decorations in the expression tree upthe branches and to the root. The method used to propagate staticdecorations through an expression tree in order to obtain a trackingdecoration is called property tracking.

TABLE 1 in FIG. 5 defines the five (5) tracking decorations EIN, DAC,DEF, GAP and NDF of the present invention. If ƒ: R^(n)→R is a realfunction and X is an n-dimensional modal interval box, each trackingdecoration is a set whose elements are the (ƒ, X) pairs which satisfythe stated mathematical property about the restriction of ƒ on Set(X).Furthermore, whenever X is the empty set the (ƒ, X) pair is an elementof EIN, otherwise the (ƒ, X) pair must be an element of anotherdecoration.

FIG. 6 is a Venn Diagram showing the logical relations between the fivesets of tracking decorations. The five tracking decorations form theinclusion relations

-   -   EIN⊆DAC⊆DEF⊆GAP⊇NDF⊇EIN

Note that EIN is a subset of all tracking decorations and GAP is asuperset of all tracking decorations.

For example, if ƒ is the square root operator and X=[1, 4] then for thisparticular (ƒ, X) pair the restriction of ƒ on X is defined andcontinuous. Since X is not empty, the (ƒ, X) pair cannot be an elementof EIN. Additionally, the (ƒ, X) pair cannot be an element of NDFbecause in this case ƒ(X) is not empty, either. However, if X is theempty set then the (ƒ, X) pair is an element of EIN, and since EIN is asubset of all tracking decorations the (ƒ, X) pair is also an element ofDAC, DEF, GAP and NDF.

An important note should be made regarding the prior art as it pertainsto decorations. A draft of the IEEE Standard for Interval Arithmetic,which is under development at the time of this writing, contains adecoration system that was at least partially conceived by the applicantof the present invention. That decoration system has some commoncharacteristics to the decoration system of the present invention, suchas DEF and DAC decorations. However, there are some importantdifferences, namely the absence of an E IN decoration as well as theinclusion of several other decorations not defined in the presentinvention such as ILL (ill-formed), COM (a common interval) and BND (abounded interval). Applicant's white paper entitled “Decorations asState Machine” provides rationale why these competing decoration systemsare unnecessary or insufficient for reliable interval computations andhow the unique decoration system of the present invention overcomesthose issues.

TABLE 2 in FIG. 5 presents the five (5) static decorations ein, dac,def, gap and ndf of the present invention. Note that static decorationshave the same names as tracking decorations, but the trackingdecorations are uppercase and the static decorations are lowercase.

For any (ƒ, X) pair, the notation S(ƒ, X) indicates which staticdecoration the (ƒ, X) pair is an element of as a function of TABLE 2. Ifƒ has n operands, the notation S(ƒ, X) is shorthand for S(ƒ, X₁, X₂, . .. X_(n)).

If ƒ: R^(n)→R is a real function and D_(ƒ)⊆R^(n) is the natural domainof ƒ, and if X is an n-dimensional modal interval box, then TABLE 3 inFIG. 5 is an alternate definition of S(ƒ, X) that defines the same setsas TABLE 2 in FIG. 5.

FIG. 7 is a Venn Diagram showing the logical relations between the fivesets of static decorations. While the tracking decorations in TABLE 1 ofFIG. 5 partition the universe of all (ƒ, X) pairs into a hierarchicalarrangement of nested sets (c, f. FIG. 6), the static decorations inTABLES 2-3 of FIG 5 partition the universe of all (f X) pairs into fivedisjoint sets(c, f. FIG. 7).

For example, if ƒ is the square root operation and X₁=[2, 4], X₂=[−1, 1]and X=[−4, −2] then S(ƒ, X₁)=dac because Set(X₁) is a nonempty subset ofD_(ƒ) and the restriction of ƒ on X₁ is continuous; S(ƒ, X₂)=gap becauseSet(X₂) is not a subset of D_(ƒ) but the intersection of Set(X₂) andD_(ƒ) is nonempty; and S(ƒ, X₃)=ndf because X₃ is not empty but theintersection of Set(X₃) and D_(ƒ) is empty.

Property tracking is the method used to propagate static decorationsthrough an expression tree in order to obtain a tracking decoration. Tofacilitate this method, the notion of a decorated interval iscontemplated. A decorated interval is a pair (X, D) that consists of amodal interval X and a tracking decoration D. The empty set is not aninterval, however the notion of a decorated empty set (Ø, D) is alsocontemplated.

The method of property tracking begins with initialization. Each modalinterval variable X₁, X₂, . . . X_(n) in the leafs of the expressiontree is promoted to a decorated interval (X₁, DAC), (X₂, DAC), . . .(X_(n), DAC). If any variable in a leaf of the expression tree is anempty set, then the empty variable is promoted to a decorated empty set(Ø, EIN). Similarly, if any variable in a leaf of the expression tree is[+∞, +∞] or [−∞, −∞], then the variable is promoted, respectively, to([+∞, +∞], GAP) or ([−∞, −∞], GAP)

The decorated variables are then propagated up the branches of theexpression tree to the operations. The operations accept the decoratedvariables as operands, perform an operation and generate a decoratedresult. For each operation, if ƒ: R^(n)→R is the real function and

(X _(i) , D _(i))=((X ₁ , D ₁), (X ₂ , D ₂), . . . , (X _(n) , D _(n)))

are the decorated inters operands of ƒ, then the decorated result of theoperation has the tracking decoration

T(ƒ, (X _(i) , D _(i)))=min{S(ƒ, X ₁ , X ₂ , . . . , X _(n)), D ₁ , D ₂, . . . , D _(n)}.

In other words, the decorated result of the operation has a trackingdecoration which is the minimum element of a set formed by the union ofthe static decoration S(ƒ, X₁, X₂, . . . , X_(n)) of the operation andthe decorations D₁, D₂, . . . , D_(n) of the operands.

For the sake of determining the minimum element of a set of decorations,the decorations are linearly ordered

-   -   ndf/NDF<gap/GAP<def/DEF<dac/DAC<ein/EIN

The decorated result of each operation is then propagated up thebranches into other operations. The procedure is repeated until allnodes in the tree have been evaluated and a final decorated result ispropagated to the root of the tree.

Digital Encodings of Modal Intervals and Decorations

Inside a computer, the endpoints of a modal interval may be representedby elements of a digital scale. In a preferred embodiment of the presentinvention, the digital scale conforms to the binary64 interchange formatencoding of IEEE 754-2008. For the sake of discourse, only the binary64encoding will be explained or considered in the rest of this document.However, the use of other digital scales or interchange format encodingsas it pertains to the present invention should be obvious.

A binary64 floating-point datum is 64 bits of information partitionedinto sign, exponent and fraction fields as shown in register 20 of FIG.8. The fraction field is in bits 0 to 51; the exponent field is in bits52 to 62; and the sign field is the most significant bit 63. Thefloating-point data represented by this encoding is:

-   -   Zero. If the exponent and fraction are zero, then the        floating-point data is a positive or negative zero +0 or −0 when        the sign bit is 0 or 1, respectively.    -   Non-zero finite number. If the exponent and fraction are not        zero and the exponent bits are not all 1, then by definition the        floating-point data is a positive or negative non-zero finite        number when the sign bit is 0 or 1, respectively.    -   Infinity. If the exponent bits are all set to 1 and the fraction        zero, then the floating-point data is +∞ or −∞ when the sign bit        is 0 or 1, respectively. The infinities are the maximum numbers        that can be represented in floating-point format. Negative        infinity is less than any finite number and positive infinity is        greater than any finite number.    -   NaN (Not-a-Number). If the exponent bits are all set to 1 and        the fraction is not zero, then the floating-point data is a        non-number that lies outside the range of representable        floating-point numbers, regardless of the sign bit. If bit 51 is        set to 1, then the NaN is quiet (QNaN); otherwise the NaN is        signaling (SNaN). For the purposes of the present invention,        bits 49 to 50 are the NaN decoration field. The NaN decoration        field is not part of the IEEE 754-2008 standard and is defined        solely for the sake of the present invention.

A binary64 datum may be associated with a truth table 23 consisting of aset of classification bits as depicted in FIG. 9. The classificationbits consist of a Sign (S), NaN (N). Infinity (I) and Zero (Z) bit. Bit63 of the binary64 datum is copied to the Sign bit. The NaN. Infinity dZero bits are set to 0 or 1 depending on the combined value of theexponent and fraction of the binary 64 datum. If the combined value isgreater than 0x7FF0000000000000, then the NaN bit is set to 1; if thecombined value is equal to 0x7FF0000000000000, then the Infinity bit isset to 1; if the combined value is equal to zero, then the Zero bit isset to 1; otherwise the respective NaN, Infinity and Zero bits are setto 0 and the binary64 datum is a positive or negative non-zero finitenumber.

If x is a floating-point datum, then S(x), N(x), I(x) and Z(x) arcnotations used in this document to represent the respective values ofthe Sign, NaN. Infinity and Zero classification bits of truth table 23.

If bit 51 of a NaN is set to 1, then the NaN is quiet (QNaN); otherwisethe NaN is signaling (SNaN). If the NaN is signaling, at least one otherfraction bit of the NaN must be set to 1 to distinguish the NaN from aninfinity. The difference between a quiet and signaling NaN is for thesake of compatibility with IEEE 754-2008 standard interchange formatencoding. However, the present invention does not require signaling NaNoperations.

Bits 0 to 50 are the NaN “payload.” All bits of the payload may be setto any value so long as the entire fraction field of a NaN does notbecome zero. The preferred embodiment of the present invention may usebits 49 to 50 of a NaN payload as a NaN decoration field to encode arepresentation of a tracking decoration.

If x is a NaN, then T(x) is the representation of a tracking decorationencoded within the NaN decoration field of x as depicted in TABLE 4 ofFIG. 5. The tracking decoration EIN has no designated encoding withinthe NaN decoration field. The reason for this will be shown in thefollowing parts of the document.

If n is the representation of a tracking decoration, then NaN(n),QNaN(n) and SNaN(n) are notations used in this document to represent therespective encodings of a NaN, quiet NaN or signaling NaN when the bitsof the decoration field are set to the corresponding value of n asdepicted in TABLE 4 of FIG. 5.

A modal interval datum [a₁, a₂] may be encoded into 128 bits as twobinary64 datums a₁ and a₂ as illustrated in register 27 of FIG. 10. Ifa₁ or a₂ is a NaN, or if a₁ and a₂ are infinities with the same sign,then the 128-bit encoding represents non-interval data.

All non-interval data is an encoding of a decorated empty set.

If a₁ and a₂ are binary64 datums that do not represent a NaN, and if nis a representation of one of the tracking decorations DAC, DEF, GAP orNDF (see TABLE 1 in FIG. 5) encoded in a NaN decoration field asdepicted in TABLE 4 of FIG. 5, then a decorated empty set (Ø, n) isencoded by any non-interval data of the form

-   -   [a₁, NaN(n)] or [NaN(n), a_(2],)

Any such encoding of a decorated empty set (Ø, n) ay be provided asinput to an operation of the present invention, and a canonical encoding

-   -   [+0, QNaN(n)] or [QNaN(n), +0]

may be provided as a result of an operation which produces a decoratedempty set as output.

Non-interval data of the form

-   -   [NaN, NaN]

is an encoding of the decorated empty set (Ø, EIN) and non-interval dataof the form

-   -   [−∞, −∞] or [+∞, +∞]

is an encoding of the decorated empty set (Ø, GAP).

FIG. 11 shows how a modal interval datum[a₁, a₂] is classified by anEmpty (E) bit and a representation of a Tracking Decoration (T). Theclassification 33 is a function of truth tables each consisting of theSign (S), NaN (N) and Infinity (I) bits, respectively, of the binary64datums a₁ and a₂, as well as the respective NaN decoration field of a₁or a₂, if either a₁ or a₂ is a NaN. The logic diagram 30 computes theclassification 33 according to the following specifications.

The Empty bit in FIG. 11 is set to 1 if a₁ and a₂ are both infinitieswith the same sign or if a₁ or a₂ is a NaN; otherwise the Empty bit isset to 0. If a₁ and a₂ are infinities with the same sign, the TrackingDecoration s GAP; if a₁ is a NaN and a₂ is not, the Tracking Decorationis a representation of the NaN decoration field from a₁; if a₂ is a NaNand a₁ is not, the Tracking

Decoration is a representation of the NaN decoration field from a₂;otherwise the Tracking Decoration is EIN. Strictly speaking, theTracking Decoration has no meaning unless the Empty bit is set to 1. Ifthe Empty bit is 0, the modal interval datum is a hounded or unboundedmodal interval and the Tracking Decoration is not used.

If [a₁, a₂] is a modal interval datum, then E(a₁, a₂) and T(a₁, a₂) arenotations used in this document to represent the respective values ofthe Empty bit and the Tracking Decoration.

Modal interval Operations with Decorations

The present invention provides an improved system and method forreliable and efficient modal interval operations using decorations. Thepreferred embodiment of the present invention is an arithmeticfunctional unit (AFU) as depicted in applicant's U.S. Pat. No. 7,949,700entitled “Modal Interval Processor.” Modal interval operand and resultsignals for the AFU are digitally encoded using the methods described inthe previous section of this document entitled “Digital Encodings ofModal Intervals and Decorations.”

As will be shown subsequently for select modal interval operations, theresult of a modal interval operation is typically obtained by performinga floating-point calculation on select endpoints of the modal intervaloperands. Because floating-point calculations are often inexact, thepresent invention requires the rounding operators ∇(x) and Δ(x) toensure modal interval results obey the “outer” digital rounding of modalintervals.

FIG. 12 shows a unary modal interval operation for example computes in afunctional element 36. Element 36 may comprise one or more sub-elementsand may be implemented as hardware, firmware or software. Element 36takes an operand [a₁, a₂] held in register 27 as input and produces aresult [b₁, b₂] held in a result register 39.

FIG. 13 is a more detailed logic diagram of FIG. 12. A truth table 48specifies the value in result register 39. The truth table is a functionof the Empty (E) bit 42 associated with operand 27. A truth table valueof 0 selects the computation function associated with the particularoperation. The other truth table value specifies the result 39 is a copyof operand 27. Therefore, if [a₁, a₂] is an encoding of non-intervaldata, i.e., if [a₁, a₂] is an encoding of a decorated empty set, thenthe operand [a₁, a₂] is the result of the operation. Otherwise [a₁, a₂]is an encoding of a bounded or unbounded modal interval and the resultis defined separately for each operation.

FIGS. 14-24 depict the result of several unary modal interval operationsafter a determination has been made that the operand [a₁, a₂] in FIG. 13is an encoding of a bounded or unbounded modal interval.

FIG. 14 is a logic diagram for a modal interval negation operation. Theoperation effectively multiplies the modal interval by −1. Sincenegation of floating-point numbers is exact, the modal interval negationoperation is exact and requires no rounding operators.

FIG. 15 is a logic diagram for a modal interval reciprocal operation.The operation is defined if and only if a₁ and a₂ are both non-zeronumbers with the same sign, otherwise the result of the operation is adecorated empty set. If a₁ and a₂ are both zero, the empty set isdecorated with NDF; otherwise the empty set is decorated with GAP.

FIG. 16 is a logic diagram for a restricted modal interval reciprocaloperation. The operation silently removes zero from the input of theoperation. Unlike the modal interval reciprocal operation in FIG. 15,the operand [a₁, a₂] may have one endpoint that is zero.

FIG. 17 is a logic diagram for a modal interval sign operation. Theoperation is defined for the entire real number line. However, theoperation is continuous if and only if a₁ and a₂ are both strictlypositive, both strictly negative or both zero. If the operation is notcontinuous, the result is an encoding of the decorated empty set (Ø,DEF).

FIG. 18 is a logic diagram for a modal interval absolute valueoperation. Since absolute value of a floating-point number a₁ or a₂ isexact, the modal interval absolute value operation is exact and requiresno rounding operators.

FIG. 19 is a logic diagram for a modal interval square operation.

FIG. 20 is a logic diagram for a modal interval square root operation.The operation is not defined if a₁ or a₂ is a negative non-zero number.In conformance to the IEEE 754-2008 standard, this allows −0 to be anelement of the natural domain of the operation. If a₁ or a₂ is anegative non-zero number, the result of the operation is a decoratedempty set. If a₁ and a₂ are both negative non-zero numbers, the emptyset is decorated with NDF; other otherwise the empty set is decoratedwith GAP.

FIG. 21 is a logic diagram for a restricted nodal interval square rootoperation. The operation silently removes negative non-zero numbers fromthe input of the operation. Unlike the modal interval square rootoperation in FIG. 20, the operand [a₁, a₂] may have one negativenon-zero number as an endpoint, so long as a₁ and a₂ are not bothnegative non-zero numbers.

FIG. 22 is a logic diagram for a modal interval exponential operation.

FIG. 23 is a logic diagram for a modal interval logarithm operation. Theoperation is defined if and only if a₁ and a₂ are both non-zero positivenumbers. If a₁ or a₂ is less-or-equal to zero, the result of theoperation is a decorated empty set. If a₁ and a₂ are both less-or-equalto zero, the empty set is decorated with NDF; otherwise the empty set isdecorated with GAP.

FIG. 24 is a logic diagram for a restricted modal interval logarithmoperation. The operation silently removes negative numbers and zero fromthe input of the operation. Unlike the modal interval logarithmoperation in FIG. 23, the operand [a₁, a₂] may have one endpointless-or-equal to zero, as long as a₁ and a₂ are not both less-or-equalto zero.

FIG. 25 shows a binary modal inter gal operation for example computes ina functional element 37. Element 37 may comprise one or moresub-elements and may be implemented as hardware, firmware or software.Element 37 takes operands [a₁, a₂] and [b₁, b₂] held respectively inregisters 27 and 28 as input and produces a result [c₁, c₂] hold in aresult register 29.

FIG. 26 is a more detailed logic diagram of FIG. 25. A comparator 44receives the tracking decoration bits derived from the operands 27 and28 and then provides a 1 output when the three tracking bits T(a₁, a₂)are numerically larger than the three tracking bits T(b₁, b₂), and a 0output otherwise. Logic elements 50 produce a truth table 58 thatspecifies the value in result register 29. A truth table value of 0 0selects the computation function associated with the particularoperation. A truth table value of 1 1 selects a value [d₁, d₂] producedby multiplexing operands 27 and 28 based on the output of comparator 44.The other truth table values specify the result defined for that truthtable value. The logic elements 50 are a function of the Empty (E) bitand Tracking Decoration (T) pairs 42 and 43 associated respectively withoperands 27 and 28. If [a₁, a₂] or [b₁, b₂] is an encoding ofnon-interval data, i.e., if [a₁, a₂] or [b₁, b₂] is an encoding of adecorated empty set, the result of the operation is one of the operands[a₁, a₁] or [b₁, b₂]. If both operands are decorated empty sets, thenthe operand with the minimum Tracking Decoration is the result, takingcare to return operand [a₁, a₂] in the event both operands are decoratedempty sets with the same Tracking Decoration; if only one operand is adecorated empty set, then the operand which is the decorated empty setis the result of the operation; otherwise [a₁, a₂] and [b₁, b₂] are bothencodings of a bounded or unbounded modal interval and the result isdefined differently for each operation.

FIGS. 27-34 depict the result of several binary modal intervaloperations after a determination has been made that the operands [a₁,a₂] and [b₁, b₂] in FIG. 26 are both encodings of a bounded or unboundedmodal interval.

FIG. 27 is a logic diagram for a binary modal interval additionoperation. The operation is not defined if a₁+b₁ or a₂+b₂ is a sum ofinfinities of opposite sign or if the sums a₁+b₁ and a₂+b₂ areinfinities of the same sign. If the operation is not defined, the resultis an encoding o the decorated empty set (Ø, GAP).

FIG. 28 is a logic diagram for a binary modal interval subtractionoperation. The operation is not defined if a₁−b₂ or a₂−b₁ is adifference of infinities of the same sign or if the differences a₁−b₂and a₂−b₁ are infinities of the same sign. If the operation is notdefined, the result is an encoding of the decorated empty set (Ø, GAP).

FIG. 29 is a logic diagram for a binary modal interval multiplicationoperation. If a₁, a₂, b₁ or b₂ is an infinity or a zero, the result ofthe operation may require a floating-point multiplication of an infinityand a zero. According to the IEEE 754-2008 standard, a floating-pointmultiplication of an infinity and a zero is an undefined operation andmay return a NaN. The modal interval multiplication operation deviatesfrom this convention and instead defines the floating-pointmultiplication of an infinity and a zero to be

(−∞)(−0)=(−0)(−∞)=+0

(−∞)(+0)=(+0)(−∞)=−0

(+∞)(−0)=(−0)(+∞)=−0

(+∞)(+0)=(+0)(+∞)=+0

according to applicant's U.S. Pat. No. 8,204,926 entitled “Reliable andEfficient Modal Interval Arithmetic Operations.” The modal intervalmultiplication operation is therefore always defined so long as theoperands [a₁, a₂], and [b₁, b₂] are bounded or unbounded modalintervals.

FIG. 30 is a logic diagram for a binary modal interval divisionoperation.

FIGS. 31-34 are logic diagrams, respectively, for the binary modalinterval lattice operations minimum, maximum, meet and join. Since theminimum and maximum of floating-point numbers is exact, all of thelattice operations are exact and require no rounding operators. It ispossible the minimum and maximum operations may produce a result whichis a representation of the decorated empty set (Ø, GAP), encoded as [−∞,−∞] for the minimum operation and [+∞, +∞] for the maximum operation.

What is claimed is:
 1. Apparatus for calculating a first result modalinterval dependent on a first modal interval, each said modal intervaldefined by first and second endpoints each comprising sign, fraction andexponent bit fields, said apparatus comprising: a) a first operandregister for holding the first and second endpoints of the first modalinterval, and for providing a first operand signal specifying thecontents of the first modal interval endpoints' fields; b) a firstanalysis element for receiving the first operand signal, for creating afirst truth table for the first endpoint and a second truth table forthe second endpoint, each truth table including a sign bit (S)indicating the sign of the respective endpoint, a not-a-number bit (N)indicating whether the respective endpoint is Not-a-Number, an infinitybit (I) indicating whether the respective endpoint is infinity and azero bit (Z) indicating whether the respective endpoint is zero; c) afirst logic array for determining a classification from the first andsecond truth tables, the classification including an empty bit (E) and,optionally, a tracking decoration (T), wherein: when the first andsecond truth tables indicate that the first and second endpoints havethe same sign and a value of infinity, the empty bit is 1 and thetracking decoration indicates an empty or non-empty restriction; whenthe first and second truth tables indicate that one of the first andsecond endpoints are not-a-number, the empty bit is 1 and the trackingdecoration is the NaN decoration field from the not-a-number endpoint;when the first and second truth tables indicate that both of the firstand second endpoints are not-a-number, the empty bit is 1 and thetracking decoration indicates an empty input restriction; otherwise theempty bit is 0 and the tracking decoration is not used; and, d)providing a result signal encoding the first result modal intervalwherein: when the empty bit is 1, the first result modal interval is thefirst modal interval; and when the empty bit is 0, the first resultmodal interval is a result of a computation by a first computationalelement receiving the first operand signal and the first and secondtruth tables.
 2. The apparatus of claim 1, wherein the first analysiselement creates the first and second truth tables dependent on apreselected exponent field bit configuration in each of the first andsecond endpoints, and on a preselected fraction field configuration ineach of the first and second endpoints.
 3. The apparatus of claim 1adapted for calculating a second result modal interval dependent on thefirst modal interval and on a second modal interval having the samestructure as the first modal interval and having a third endpoint and afourth endpoint, comprising: a) a second operand register for holdingthe third endpoint and the fourth endpoint of the second modal interval,and for providing a second operand signal specifying the contents of thesecond modal interval's endpoints' fields; b) a second analysis elementfor receiving the second operand signal, creating a third truth tablefor the third endpoint and a fourth truth table for the fourth endpoint;c) a second logic array for determining a classification from the thirdarid fourth truth tables, the classification including an empty bit (E)and, optionally, a tracking decoration (T), wherein: when the third andfourth truth tables indicate that the third and fourth endpoints havethe same sign and a value of infinity, the empty bit is 1 and thetracking decoration indicates an empty or non-empty restriction; whenthe third and fourth truth tables indicate that one of the third andfourth endpoints are not-a-number, the empty bit is 1 and the trackingdecoration is the NaN decoration field from the not-a-number endpoint;when the third and fourth truth tables indicate that both of the thirdand fourth endpoints are not-a-number, the empty bit is 1 and thetracking decoration indicates an empty input restriction; otherwise theempty bit is and the tracking decoration is not used; d)-h) providing aresult signal encoding the second result modal interval wherein: whenthe empty bit from the classification of the first and second truthtables is 1 and the empty bit from the classification of the third andfourth truth tables is 1, the second result modal interval is either thefirst modal interval or the second modal interval, whichever isassociated with the tracking decoration of minimum value (see referencenumeral 50); when the empty bit from the classification of the first andsecond truth tables is 1 and the empty bit from the classification ofthe third and fourth truth tables is 0, the second result modal intervalis the first modal interval; when the empty bit from the classificationof the first and second truth tables is 0 and the empty bit from theclassification of the third and fourth truth tables is 1, the secondresult modal interval is the second modal interval; and when the emptybit from the classification of the s and second truth tables is 0 andthe empty bit from the classification of the third and fourth truthtables is 0, the second result modal interval is a result of acomputation by a second computational element receiving the first andsecond operands signals and the first, second, third, and fourth truthtables.